<!-- 封装通用列表组件 -->

<script setup>
// import { onBeforeMount, reactive, toRefs,ref,computed  } from 'vue';
// import { deleteNamespaceHandler as deleteHandler, getNamespaceListHandler as getListHandler, createNamespaceHandler as createHandler  } from '../../api/namespace.js';
// import { listClusterHandler  } from '../../api/cluster.js';
// import {useRoute} from 'vue-router'
// import { ElMessage  } from 'element-plus'

const props = defineProps({
    title: {
        type: String,
        default: ""
    },
    userForm: {
        type: Object
    }
})
</script>

<template>
    <el-card class="box-card">
      <template #header>
        <div class="card-header">
          <div>
            <span>{{ props.title }}</span>
          </div>
          <!-- 放置header操作组件 -->
          <div class="card-header">
            <slot name="header-options"></slot>
          </div>
        </div>
      </template>
      <!-- 放真实数据的地址，card body -->
      <slot name="main"></slot>
      <!-- 尾部的布局 -->
      <div class="auto-space-between" style="margin-top: 10px;">
        <!-- 总数的统计 -->
        <!-- 左侧功能 -->
        <div>
            <slot name="footer-left"></slot>
        </div>
        <!-- 右侧功能 -->
        <div>
            <slot name="footer-right"></slot>
        </div>
      </div>
    </el-card>
</template>

<style scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text {
  font-size: 14px;
}

.item {
  margin-bottom: 18px;
}

</style>
